<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.15"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>CryptoAuthLib: hal_pic32mx695f512h_i2c.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  $(document).ready(initResizable);
/* @license-end */</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">CryptoAuthLib
   </div>
   <div id="projectbrief">Microchip CryptoAuthentication Library</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.15 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('a00437_source.html','');});
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">hal_pic32mx695f512h_i2c.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="a00437.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;</div><div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;<span class="preprocessor">#ifndef HAL_PIC32MX695F512H_I2C_ASF_H_</span></div><div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;<span class="preprocessor">#define HAL_PIC32MX695F512H_I2C_ASF_H_</span></div><div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;</div><div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;</div><div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;<span class="comment">// Clock Constants</span></div><div class="line"><a name="l00046"></a><span class="lineno"><a class="line" href="a00993.html#ga2f50cb3bdd9fd741e11f2389ea1bff4a">   46</a></span>&#160;<span class="preprocessor">#define GetSystemClock()        (80000000ul)</span></div><div class="line"><a name="l00047"></a><span class="lineno"><a class="line" href="a00993.html#ga1b199a0aedb00251513eb57552f738b4">   47</a></span>&#160;<span class="preprocessor">#define GetPeripheralClock()    (GetSystemClock() / (1 &lt;&lt; OSCCONbits.PBDIV))</span></div><div class="line"><a name="l00048"></a><span class="lineno"><a class="line" href="a00993.html#ga450d95819e5184befaec71050a61dce9">   48</a></span>&#160;<span class="preprocessor">#define GetInstructionClock()   (GetSystemClock())</span></div><div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;</div><div class="line"><a name="l00050"></a><span class="lineno"><a class="line" href="a00993.html#gaf89a7a4080a47aa10a5504291db285bf">   50</a></span>&#160;<span class="preprocessor">#define MAX_I2C_BUSES           4   // PIC32MX695F512H has 4 TWI</span></div><div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;</div><div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;<span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="a01117.html">atcaI2Cmaster</a></div><div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;{</div><div class="line"><a name="l00057"></a><span class="lineno"><a class="line" href="a01117.html#a10c34d148db33a5f64c3730a163fb7a7">   57</a></span>&#160;    I2C_MODULE <a class="code" href="a01117.html#a10c34d148db33a5f64c3730a163fb7a7">id</a>;</div><div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;    <span class="keywordtype">int</span>        <a class="code" href="a01117.html#ad72ba8c994f4d0e5ce354e17f7c427c0">ref_ct</a>;</div><div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;    <span class="comment">// for conveniences during interface release phase</span></div><div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;    <span class="keywordtype">int</span> <a class="code" href="a01117.html#af5c011e6c2e8d49675f7029e8ec2c0a6">bus_index</a>;</div><div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;} <a class="code" href="a00993.html#gae8f36006f14bf6a9f4914bac69ed9f98">ATCAI2CMaster_t</a>;</div><div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;</div><div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;<span class="keywordtype">void</span> <a class="code" href="a00993.html#ga8fc6a91c0d59cdf46f1bdf33ca8ab048">i2c_write</a>(I2C_MODULE i2c_id, uint8_t address, uint8_t *data, <span class="keywordtype">int</span> len);</div><div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;<a class="code" href="a00173.html#a22bd6643f31f1d75dc3e7ea939f468cd">ATCA_STATUS</a> <a class="code" href="a00993.html#gaf31b095e9faac0c43ba3f0403bc52cf4">i2c_read</a>(I2C_MODULE i2c_id, uint8_t address, uint8_t *data, uint16_t len);</div><div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;</div><div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;<span class="keywordtype">void</span> <a class="code" href="a00993.html#gab7f613b378e0d01b80703df3ac662d6d">change_i2c_speed</a>(<a class="code" href="a01041.html">ATCAIface</a> iface, uint32_t <a class="code" href="a00993.html#ga218b4f7c6cc2681a99c23a3b089d68b1">speed</a>);</div><div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;</div><div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;<span class="preprocessor">#endif  </span><span class="comment">/* HAL_PIC32MX695F512H_I2C_ASF_H_ */</span><span class="preprocessor"></span></div><div class="ttc" id="a01117_html_af5c011e6c2e8d49675f7029e8ec2c0a6"><div class="ttname"><a href="a01117.html#af5c011e6c2e8d49675f7029e8ec2c0a6">atcaI2Cmaster::bus_index</a></div><div class="ttdeci">int bus_index</div><div class="ttdoc">for conveniences during interface release phase</div><div class="ttdef"><b>Definition:</b> hal_at90usb1287_i2c_asf.h:53</div></div>
<div class="ttc" id="a00173_html_a22bd6643f31f1d75dc3e7ea939f468cd"><div class="ttname"><a href="a00173.html#a22bd6643f31f1d75dc3e7ea939f468cd">ATCA_STATUS</a></div><div class="ttdeci">ATCA_STATUS</div><div class="ttdef"><b>Definition:</b> atca_status.h:41</div></div>
<div class="ttc" id="a00993_html_gab7f613b378e0d01b80703df3ac662d6d"><div class="ttname"><a href="a00993.html#gab7f613b378e0d01b80703df3ac662d6d">change_i2c_speed</a></div><div class="ttdeci">void change_i2c_speed(ATCAIface iface, uint32_t speed)</div><div class="ttdoc">method to change the bus speed of I2C</div><div class="ttdef"><b>Definition:</b> hal_at90usb1287_i2c_asf.c:374</div></div>
<div class="ttc" id="a01041_html"><div class="ttname"><a href="a01041.html">atca_iface</a></div><div class="ttdoc">atca_iface is the C object backing ATCAIface. See the atca_iface.h file for details on the ATCAIface ...</div><div class="ttdef"><b>Definition:</b> atca_iface.h:129</div></div>
<div class="ttc" id="a00993_html_ga218b4f7c6cc2681a99c23a3b089d68b1"><div class="ttname"><a href="a00993.html#ga218b4f7c6cc2681a99c23a3b089d68b1">speed</a></div><div class="ttdeci">int speed</div><div class="ttdef"><b>Definition:</b> hal_linux_kit_cdc.c:61</div></div>
<div class="ttc" id="a01117_html_ad72ba8c994f4d0e5ce354e17f7c427c0"><div class="ttname"><a href="a01117.html#ad72ba8c994f4d0e5ce354e17f7c427c0">atcaI2Cmaster::ref_ct</a></div><div class="ttdeci">int ref_ct</div><div class="ttdef"><b>Definition:</b> hal_at90usb1287_i2c_asf.h:52</div></div>
<div class="ttc" id="a01117_html_a10c34d148db33a5f64c3730a163fb7a7"><div class="ttname"><a href="a01117.html#a10c34d148db33a5f64c3730a163fb7a7">atcaI2Cmaster::id</a></div><div class="ttdeci">I2C_MODULE id</div><div class="ttdef"><b>Definition:</b> hal_pic32mx695f512h_i2c.h:57</div></div>
<div class="ttc" id="a00993_html_ga8fc6a91c0d59cdf46f1bdf33ca8ab048"><div class="ttname"><a href="a00993.html#ga8fc6a91c0d59cdf46f1bdf33ca8ab048">i2c_write</a></div><div class="ttdeci">void i2c_write(I2C_MODULE i2c_id, uint8_t address, uint8_t *data, int len)</div><div class="ttdef"><b>Definition:</b> hal_pic32mx695f512h_i2c.c:188</div></div>
<div class="ttc" id="a01117_html"><div class="ttname"><a href="a01117.html">atcaI2Cmaster</a></div><div class="ttdoc">this is the hal_data for ATCA HAL created using ASF</div><div class="ttdef"><b>Definition:</b> hal_at90usb1287_i2c_asf.h:49</div></div>
<div class="ttc" id="a00993_html_gae8f36006f14bf6a9f4914bac69ed9f98"><div class="ttname"><a href="a00993.html#gae8f36006f14bf6a9f4914bac69ed9f98">ATCAI2CMaster_t</a></div><div class="ttdeci">struct atcaI2Cmaster ATCAI2CMaster_t</div><div class="ttdoc">this is the hal_data for ATCA HAL</div></div>
<div class="ttc" id="a00993_html_gaf31b095e9faac0c43ba3f0403bc52cf4"><div class="ttname"><a href="a00993.html#gaf31b095e9faac0c43ba3f0403bc52cf4">i2c_read</a></div><div class="ttdeci">ATCA_STATUS i2c_read(I2C_MODULE i2c_id, uint8_t address, uint8_t *data, uint16_t len)</div><div class="ttdef"><b>Definition:</b> hal_pic32mx695f512h_i2c.c:211</div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_97aefd0d527b934f1d99a682da8fe6a9.html">lib</a></li><li class="navelem"><a class="el" href="dir_e870e4dac26de7990352b1cb7547818f.html">hal</a></li><li class="navelem"><a class="el" href="a00437.html">hal_pic32mx695f512h_i2c.h</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.15 </li>
  </ul>
</div>
</body>
</html>
